package com.example.hospitalbakcends.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 医生
 * @TableName doctor
 */
@TableName(value = "doctor")
@Data
public class Doctor implements Serializable {
    /**
     * doctorId
     */
    @TableId(type = IdType.AUTO)//在自增主键的变量加上即可
    private Long doctorid;

    /**
     * 医生账号
     */
    private String doctoraccount;

    /**
     * 医生密码
     */
    private String doctorpassword;

    /**
     * 医生姓名
     */
    private String doctorname;

    /**
     * 医生头像
     */
    private String doctoravatar;

    /**
     * 医生年龄
     */
    private Integer doctorage;

    /**
     * 医生电话
     */
    private String doctorphone;

    /**
     * 医生所属科室
     */
    private String doctordepartment;

    /**
     * 值班日期
     */
    private Date workdaily;

    /**
     * 医生身份：/doctor/admin/ban
     */
    private String doctorrole;

    /**
     * 创建时间
     */
    private Date createtime;

    /**
     * 已经预约人数
     */
    private Integer isbooknum;

    /**
     * 更新时间
     */
    private Date updatetime;

    /**
     * 是否删除
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    /**
     * doctorId
     */
    public Long getDoctorid() {
        return doctorid;
    }

    /**
     * doctorId
     */
    public void setDoctorid(Long doctorid) {
        this.doctorid = doctorid;
    }

    /**
     * 医生账号
     */
    public String getDoctoraccount() {
        return doctoraccount;
    }

    /**
     * 医生账号
     */
    public void setDoctoraccount(String doctoraccount) {
        this.doctoraccount = doctoraccount;
    }

    /**
     * 医生密码
     */
    public String getDoctorpassword() {
        return doctorpassword;
    }

    /**
     * 医生密码
     */
    public void setDoctorpassword(String doctorpassword) {
        this.doctorpassword = doctorpassword;
    }

    /**
     * 医生姓名
     */
    public String getDoctorname() {
        return doctorname;
    }

    /**
     * 医生姓名
     */
    public void setDoctorname(String doctorname) {
        this.doctorname = doctorname;
    }

    /**
     * 医生头像
     */
    public String getDoctoravatar() {
        return doctoravatar;
    }

    /**
     * 医生头像
     */
    public void setDoctoravatar(String doctoravatar) {
        this.doctoravatar = doctoravatar;
    }

    /**
     * 医生年龄
     */
    public Integer getDoctorage() {
        return doctorage;
    }

    /**
     * 医生年龄
     */
    public void setDoctorage(Integer doctorage) {
        this.doctorage = doctorage;
    }

    /**
     * 医生电话
     */
    public String getDoctorphone() {
        return doctorphone;
    }

    /**
     * 医生电话
     */
    public void setDoctorphone(String doctorphone) {
        this.doctorphone = doctorphone;
    }

    /**
     * 医生所属科室
     */
    public String getDoctordepartment() {
        return doctordepartment;
    }

    /**
     * 医生所属科室
     */
    public void setDoctordepartment(String doctordepartment) {
        this.doctordepartment = doctordepartment;
    }

    /**
     * 值班日期
     */
    public Date getWorkdaily() {
        return workdaily;
    }

    /**
     * 值班日期
     */
    public void setWorkdaily(Date workdaily) {
        this.workdaily = workdaily;
    }

    /**
     * 医生身份：/doctor/admin/ban
     */
    public String getDoctorrole() {
        return doctorrole;
    }

    /**
     * 医生身份：/doctor/admin/ban
     */
    public void setDoctorrole(String doctorrole) {
        this.doctorrole = doctorrole;
    }

    /**
     * 创建时间
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * 创建时间
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * 已经预约人数
     */
    public Integer getIsbooknum() {
        return isbooknum;
    }

    /**
     * 已经预约人数
     */
    public void setIsbooknum(Integer isbooknum) {
        this.isbooknum = isbooknum;
    }

    /**
     * 更新时间
     */
    public Date getUpdatetime() {
        return updatetime;
    }

    /**
     * 更新时间
     */
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    /**
     * 是否删除
     */
    public Integer getIsdelete() {
        return isdelete;
    }

    /**
     * 是否删除
     */
    public void setIsdelete(Integer isdelete) {
        this.isdelete = isdelete;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Doctor other = (Doctor) that;
        return (this.getDoctorid() == null ? other.getDoctorid() == null : this.getDoctorid().equals(other.getDoctorid()))
            && (this.getDoctoraccount() == null ? other.getDoctoraccount() == null : this.getDoctoraccount().equals(other.getDoctoraccount()))
            && (this.getDoctorpassword() == null ? other.getDoctorpassword() == null : this.getDoctorpassword().equals(other.getDoctorpassword()))
            && (this.getDoctorname() == null ? other.getDoctorname() == null : this.getDoctorname().equals(other.getDoctorname()))
            && (this.getDoctoravatar() == null ? other.getDoctoravatar() == null : this.getDoctoravatar().equals(other.getDoctoravatar()))
            && (this.getDoctorage() == null ? other.getDoctorage() == null : this.getDoctorage().equals(other.getDoctorage()))
            && (this.getDoctorphone() == null ? other.getDoctorphone() == null : this.getDoctorphone().equals(other.getDoctorphone()))
            && (this.getDoctordepartment() == null ? other.getDoctordepartment() == null : this.getDoctordepartment().equals(other.getDoctordepartment()))
            && (this.getWorkdaily() == null ? other.getWorkdaily() == null : this.getWorkdaily().equals(other.getWorkdaily()))
            && (this.getDoctorrole() == null ? other.getDoctorrole() == null : this.getDoctorrole().equals(other.getDoctorrole()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getIsbooknum() == null ? other.getIsbooknum() == null : this.getIsbooknum().equals(other.getIsbooknum()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDoctorid() == null) ? 0 : getDoctorid().hashCode());
        result = prime * result + ((getDoctoraccount() == null) ? 0 : getDoctoraccount().hashCode());
        result = prime * result + ((getDoctorpassword() == null) ? 0 : getDoctorpassword().hashCode());
        result = prime * result + ((getDoctorname() == null) ? 0 : getDoctorname().hashCode());
        result = prime * result + ((getDoctoravatar() == null) ? 0 : getDoctoravatar().hashCode());
        result = prime * result + ((getDoctorage() == null) ? 0 : getDoctorage().hashCode());
        result = prime * result + ((getDoctorphone() == null) ? 0 : getDoctorphone().hashCode());
        result = prime * result + ((getDoctordepartment() == null) ? 0 : getDoctordepartment().hashCode());
        result = prime * result + ((getWorkdaily() == null) ? 0 : getWorkdaily().hashCode());
        result = prime * result + ((getDoctorrole() == null) ? 0 : getDoctorrole().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getIsbooknum() == null) ? 0 : getIsbooknum().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", doctorid=").append(doctorid);
        sb.append(", doctoraccount=").append(doctoraccount);
        sb.append(", doctorpassword=").append(doctorpassword);
        sb.append(", doctorname=").append(doctorname);
        sb.append(", doctoravatar=").append(doctoravatar);
        sb.append(", doctorage=").append(doctorage);
        sb.append(", doctorphone=").append(doctorphone);
        sb.append(", doctordepartment=").append(doctordepartment);
        sb.append(", workdaily=").append(workdaily);
        sb.append(", doctorrole=").append(doctorrole);
        sb.append(", createtime=").append(createtime);
        sb.append(", isbooknum=").append(isbooknum);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}